True Lies: Lazy Contracts for Lazy Languages Faithfulness is Better than Laziness
نویسندگان
چکیده
Contracts are a proven tool in software development. They provide specifications for operations that may be statically verified or dynamically validated by contract monitoring. Contract monitoring for lazy programming languages does not have a generally accepted basis. This paper discusses three approaches, eager, semi-eager, and lazy monitoring, all of which are flawed. The first two may change program behavior, while the last two may lead to silent contract violations.
منابع مشابه
A Unifying Theory of True Concurrency Based on CSP and Lazy Observation
What if the CSP observer were lazy? This paper considers the consequences of altering the behavior of the CSP observer. Specifically, what implications would this new behavior have on CSP’s traces? Laziness turns out to be a useful metaphor. We show how laziness permits transforming CSP into a model of true concurrency (i.e., non-interleaved trace semantics). Furthermore, the notion of a lazy o...
متن کاملLaziness by Need
Lazy functional programming has many benefits that strict functional languages can simulate via lazy data constructors. In recognition, ML, Scheme, and other strict functional languages have supported lazy stream programming with delay and force for several decades. Unfortunately, the manual insertion of delay and force can be tedious and error-prone. We present a semantics-based refactoring th...
متن کاملA Pure Language with Default Strict Evaluation Order and Explicit Laziness
We propose a pure language with a default strict evaluation order and explicit laziness annotations. These annotations do not make a distinction between the types of values and computations as is often done in lazy additions to strict languages. This supplies all the expressivity available in lazy languages with much of the speed available in strict languages, for the modest cost of programmer ...
متن کاملTitle: Examine Your Laziness. a Lightweight Procedural Debugging Technique for Haskell Examine Your Laziness. a Lightweight Procedural Debugging Technique for Haskell
Writing debuggers for lazy functional languages is known to be difficult. While some recent progress has been made in this area, there is a dearth of practical tools which are applicable to real programs. We present a lightweight approach to procedural debugging, based on the traditional “stop-examine-continue” model using breakpoints. Our debugger sidesteps most of the problematic issues with ...
متن کاملThe Impact of Laziness on Parallelism and the Limits of StrictnessAnalysisG
The major question examined by this paper is whether suucient ne-grain parallelism can be obtained from programs written in a lazy functional language. To answer this question, we have implemented a prototype compiler based on a novel approach to strictness analysis (called abstract demand propagation) and we have compared this implementation strategy (optimized lazy) with other implementations...
متن کامل